<template>
<!-- Home里的编辑推荐的每一项 -->
  <li @click="songList(item.id)">
    <div class="card_item">
      <div class="imgBox">
        <img :src="item.picUrl">
      </div>
      <span class="listen_time">
        <img src="../assets/images/ear.png" width="13">
        {{(item.playCount/10000).toFixed(1)}}万
      </span>
    </div>
    <p>{{item.name}}</p>
  </li>
</template>

<script>
export default {
  props: {
    item: Object,
  },
  methods: {
    songList: function(id){
      this.$router.push({ path: '/homeMusicItemSong', query: { id }})
    },
  }
  
}
</script>

<style lang="less" scoped>
  li{
    width: 32.9%;
    display: inline-block;
    height: 160px;
    .card_item{
      position: relative;
      .imgBox{
        background: linear-gradient(to bottom,  #bebaba 0%,#ffffff 100%);
      }
      & + img{
        width: 100%;
        vertical-align: bottom;
      }
      .listen_time{
        font-size: 13px;
        position: absolute;
        right: 5px;
        top: 5px;
        z-index: 1;
        color: white;
      }
    }
    p{
      font-size: 14px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      font-size: 13px;
      margin: 0px 5px 5px 5px;
    }
  }
</style>